import KZJRequest from '../index'
import { TRequestDefaultResult } from '../type'

enum Anchor {
  detail = '/dj/detail',
  program = '/dj/program'
}

export function getAnchorDeatil(rid: number) {
  return KZJRequest.get<TRequestDefaultResult>({
    url: Anchor.detail,
    params: { rid },
    showLoading: true
  })
}

export function getAnchorProgram(rid: number, asc = false) {
  return KZJRequest.get<TRequestDefaultResult>({
    url: Anchor.program,
    params: { rid, asc },
    showLoading: true
  })
}
